#include "clock.h"
#include "clockplugin.h"

#include <QtCore/QtPlugin>

ClockPlugin::ClockPlugin(QObject *parent)
    : QObject(parent)
{
    m_initialized = false;
}

void ClockPlugin::initialize(QDesignerFormEditorInterface * /* core */)
{
    if (m_initialized)
        return;

    // Add extension registrations, etc. here

    m_initialized = true;
}

bool ClockPlugin::isInitialized() const
{
    return m_initialized;
}

QWidget *ClockPlugin::createWidget(QWidget *parent)
{
    return new Clock(parent);
}

QString ClockPlugin::name() const
{
    return QLatin1String("Clock");
}

QString ClockPlugin::group() const
{
    return QLatin1String("Custom Widget VIG");
}

QIcon ClockPlugin::icon() const
{
    return QIcon();
}

QString ClockPlugin::toolTip() const
{
    return QLatin1String("");
}

QString ClockPlugin::whatsThis() const
{
    return QLatin1String("");
}

bool ClockPlugin::isContainer() const
{
    return false;
}

QString ClockPlugin::domXml() const
{
    return QLatin1String("<widget class=\"Clock\" name=\"clock\">\n</widget>\n");
}

QString ClockPlugin::includeFile() const
{
    return QLatin1String("clock.h");
}

Q_EXPORT_PLUGIN2(clockplugin, ClockPlugin)
